package com.usefullc.system.dao;

import com.usefullc.system.domain.DataDict;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author: Sampson
 * @date: 2022-04-14 08:49
 */
public interface DataDictDao extends JpaRepository<DataDict, Long> {

    @Transactional
    @Modifying
    @Query(value = "delete from `sys_data_dict` t  where t.code like ?1% ",nativeQuery = true)
    int delByCodeLike(String codeLike);
}
